package com.example.demo.mapper;

import com.example.demo.model.Message;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface MessageMapper {
    @Select("select * from message_info")
//    @Results(id = "base",value = {@Result(column = "message",property = "say") })
    List<Message> selectAll();



    @Insert("insert into message_info(`from`,`to`,message) values( #{from},#{to},#{message})")
    Integer insertMessage(Message message);
}
